package com.Teacher.controller;

import com.Teacher.TeacherServiceApplication;
import com.Teacher.model.TeacherInfo;
import com.Teacher.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2024-07-20
 * Time:16:44
 * Text：
 */
@RestController
@RequestMapping("/Teacher")
public class TeacherController {

    @Autowired
    TeacherService teacherService;
    @RequestMapping({"/{classroom}"})
    public TeacherInfo getTeacherId(@PathVariable("classroom")String classroom){
        return teacherService.getclassroom(classroom);
    }
}
